package io.github.wanggit.antrpc.client.monitor.report;

import io.github.wanggit.antrpc.commons.bean.RpcCallLog;
import io.github.wanggit.antrpc.commons.config.IConfiguration;
import io.github.wanggit.antrpc.commons.utils.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;

@Slf4j
public class Slf4jInfoLogReporter extends AbstractLogReporter {

    public Slf4jInfoLogReporter(IConfiguration configuration, ApplicationContext context) {
        super(configuration);
    }

    @Override
    protected void internalReport(
            RpcCallLog callLog, ZipkinAllMethodTracing.TracingPairs lastTracingPairs) {
        log.info(JsonUtils.toJsonString(callLog));
    }
}
